using UnityEngine;
using UnityEngine.UI;

public class HpBarB : MonoBehaviour
{
    public Image hpPro;
    public Text txtHp;

    public void SetHp(int max, int hp)
    {
        if (txtHp) txtHp.text = max + "/" + hp;
        hpPro.fillAmount = (float)hp / max;
    }
}